-module(stats_handler).
-export([init/1, terminate/1, handle_event/2]).

init([]) ->
    [].

terminate(StatsList) ->
    StatsList.

handle_event({Action, _Id, Event}, []) ->
    [{Action, Event, 1}];
handle_event({Action, _Id, Event}, [{Action, Event, Count} | Other]) -> 
    [{Action, Event, Count+1} | Other];
handle_event({Action, Id, Event}, StatsList) ->
    handle_event({Action, Id, Event}, StatsList).

